import request from '/@/utils/request';
export async function getUserInfo() {
	return await request({
		url: 'user/get',
		method: 'get'
	});
}
export async function getCaseHome() {
	return await request({
		url: 'case/home',
		method: 'get'
	});
}
export async function getEvidenceHome() {
	return await request({
		url: 'evidence/home',
		method: 'get'
	});
}
export async function GetEvidenceClass() {
	return await request({
		url: 'evidence/home/class',
		method: 'get'
	});
}
export async function GetTransfereEvidenceTrends() {
	return await request({
		url: 'evidence/transfere/home/trends',
		method: 'get'
	});
}
export async function GetWarnCheckout() {
	return await request({
		url: 'warn/home',
		method: 'get'
	});
}
export async function GetEnvironmentList() {
	return await request({
		url: 'warn/home/envi',
		method: 'get'
	}).then((res:any)=>{
		var r = [
			{
				icon: 'iconfont icon-yangan',
				label: '烟感',
				value: res.data.yanGan ? '正常': "异常",
				iconColor: '#F72B3F',
			},
			{
				icon: 'iconfont icon-wendu',
				label: '温度',
				value: res.data.wenDu ? '正常': "异常",
				iconColor: '#91BFF8',
			},
			{
				icon: 'iconfont icon-shidu',
				label: '湿度',
				value: res.data.shiDu ? '正常': "异常",
				iconColor: '#88D565',
			},
			{
				icon: 'iconfont icon-zaosheng',
				label: '监控',
				value: res.data.jianKong ? '正常': "异常",
				iconColor: '#cb79ff',
			},
			{
				icon: 'iconfont icon-shenqingkaiban',
				label: '空气质量',
				value: res.data.kongQiZhiLiang ? '正常': "异常",
				iconColor: '#f95b5a',
			},
			{
				icon: 'iconfont icon-AIshiyanshi',
				label: '水侵传感',
				value: res.data.shuiQinChuanGan ? '正常': "异常",
				iconColor: '#03387a',
			},
		];
		return r;
	});
}
